<?php
// $Id: buildtool-build-details.tpl.php 6 2008-08-20 17:37:39Z hegarin $

/**
 * @file buildtool-build-details.tpl.php
 * Theme implementation to display a build order's details.
 *
 * Available variables:
 * - $row: The build order details.
 *
 * $row contains:
 * - $row->build_id: The id of the order.
 * - $row->requestType: The type of request, either bpc or item.
 * - $row->requestTime: The time the request was made.
 * - $row->requestor: The person that made the request.
 * - $row->stationName: The name of the station for the build request.
 * - $row->qty_remaining: The quantity remaining of product according to the builder.
 * - $row->requestor_notes: Any notes made by the requestor for the builder.
 * - $row->build_status: The status of the order. 0 for open, 1 for completed, 2 for closed.
 * - $row->qty_built: If completed this holds the number of units built according to the builder.
 * - $row->bp_me: If completed this holds the ME of the bp used for the order.
 * - $row->bp_pe: If completed this holds the PE of the bp used for the order.
 * - $row->eta_time: The time that the build should be complete.
 * - $row->builder_notes: Any notes made by the builder for the requestor.
 */
?>
<br />
<h1><?php print $row->build_id.' - '.$row->typeName; ?></h1>
<br />
<?php print ($row->requestType == 'bpc' ? 'BPC' : 'Item/Ship'); ?>
<br />
Requested on <?php print $row->requestTime; ?> by <?php print $row->requestor; ?>.
<br />
Station: <?php print $row->stationName; ?>
<br />
Quantity Remaining: <?php print $row->qty_remaining; ?>
<br />
Requestor Notes: <?php print $row->requestor_notes; ?>
<br />
Status: 
<?php if($row->build_status == 0): ?>
  Open
<?php elseif($row->build_status == 1): ?>
  Completed
  <br />
  Quantity Built: <?php print $row->qty_built; ?>
  <br />
  ME: <?php print $row->bp_me; ?>
  <br />
  PE: <?php print $row->bp_pe; ?>
  <br />
  Completion Time: <?php print $row->eta_time; ?>
<?php else: ?>
  Closed
<?php endif; ?>
<br />
<?php if($row->build_status != 0): ?>
  <?php print ($row->build_status == 1 ? 'Completed' : 'Closed'); ?> by <?php print $row->builder; ?>
  <br />
  Builder Notes: <?php print $row->builder_notes; ?>
<?php else: ?>
  <br />
<?php endif; ?>
<?php if (user_access('manage buildtool')): ?>
  <?php print l('Manage Requests', 'buildtool/manage'); ?>
<?php endif; ?>